import { Component, OnInit, Input } from '@angular/core';
import { TutorialService } from 'src/app/service/tutorialService';

@Component({
  selector: 'app-blog-list',
  templateUrl: './blog-list.component.html',
  styleUrls: ['./blog-list.component.css']
})
export class BlogListComponent implements OnInit {

  @Input("blogType") blogType: string;

  blogs: any[];

  constructor(private tutorialService: TutorialService) { }

  ngOnInit(): void {
    console.log(this.blogType);
    this.tutorialService.getMarkdownFileInfos(this.blogType).subscribe(datas=>{
      this.blogs = datas;
      console.log(datas);
    })
  }


}
